﻿using System;

namespace ConsoleCommand.Commands
{
    class ColorCommand : ICommand
    {
        string color;

        public ColorCommand(string color){
            this.color=color;
        }

        public object Execute() {
            if(!String.IsNullOrEmpty(color)){
                Console.ForegroundColor=(ConsoleColor)Enum.Parse(typeof(ConsoleColor),color,true);
            }
            return Console.ForegroundColor;
        }
    }
}
